-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add proxy support for extension installation. #6911
Conversation
Configurable via a "proxy" preference (which could be used for other parts of Brackets that should use HTTP proxy). This fixes #6241, #5958 and [this backlog item](https://trello.com/c/SEV95fdK/902-support-for-a-proxy-in-extensions-installation)
For anyone wanting to test this, you can easily do so by running the script at this page in Node and setting the "proxy" configuration variable. |
@dangoor how do the preferences work? I'm not sure what I'm testing there. |
Ahh, yes, that wasn't clear. In your user config file (the one available from Debug/Open Preferences File), add this:
and then run that script that I linked to above (make sure you use |
function _cmdDownloadFile(downloadId, url, callback) { | ||
function _cmdDownloadFile(downloadId, url, proxy, callback) { | ||
// Backwards compatibility check, added in 0.37 | ||
if (typeof proxy === "function") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not if (typeof proxy !== "string")
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nevermind, maybe you need else if (typeof proxy !== "string")
just to make sure we're not passing garbage in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disregard that as well. I see we don't really do much parameter validation as it is.
Looks good. Merging. |
Add proxy support for extension installation.
👍 |
Configurable via a "proxy" preference (which could be used for other parts of
Brackets that should use HTTP proxy).
This fixes #6241, #5958 and this backlog item